#include "sm_bsp.h"
#include "sm_nvs.h"
#include "sm_uart.h"
#include "sm_gpio.h"

#include "esp_err.h"
#include "esp_event.h"
#include "freertos/event_groups.h"



void sm_bsp_init(void)
{
    //创建默认事件循环任务
    ESP_ERROR_CHECK(esp_event_loop_create_default());

    sm_nvs_flash_init();

    sm_uart_obj uart0_config = 
    {
        .uart_num = CONFIG_ESP_CONSOLE_UART_NUM,
        .tx_io_num = -1,
        .rx_io_num = -1,
        .rts_io_num = -1,
        .cts_io_num = -1,
        .baud  = CONFIG_ESP_CONSOLE_UART_BAUDRATE,
    };

    vTaskDelay(200);
    
    sm_uart_init(&uart0_config);
    

}

